Repository navigation
Conversation
413cd64 to
df783f7
Compare
|
CI status after
Happy to split the |
df783f7 to
6c068f5
Compare
|
Update after
Full test matrix (stable/nightly/1.63 MSRV) passed on the identical code at |
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
|
@claude review this pr if it satisfies the fix required and for regressions |
6c068f5 to
299e3ae
Compare
Compute satisfaction and dissatisfaction in post-order and reuse child outcomes, preventing nested branches from consuming exponential CPU. Check context resource limits before satisfaction and template building to reject invalid untrusted descriptors and PSBT scripts early. Cover nested branch complexity, resource boundaries, descriptor plans, and signed PSBT finalization. Document the stricter resource checks. Ticket: CSHLD-2226 Signed-off-by: Mukesh Mahadev Prajapati <mukeshmahadev@bitgo.com>
299e3ae to
0cd3704
Compare
|
@claude re-review |
What
Why
Nested, well-typed scripts can otherwise make descriptor planning or PSBT finalization consume exponential CPU: a ~28-level
or_b(u:t:v:X, s:pk)chain (sane, non-malleable, within Segwitv0 limits) costs ~5e9 allocating helper calls, andwsh()/tr()forms admit 82–100 levels that never return. The post-order pass makes evaluation linear in the number of nodes, and the resource gates reject untrusted scripts that no path can spend (fail fast) without blocking scripts that have a valid, in-limit spending path.Test plan
cargo test -p miniscript --all-features— 158 unit tests, 5 integration tests, 7 doc tests (2 ignored) passed.cargo check -p miniscript --no-default-featurespassed.or_b/or_d/andor/threshnormal and malleable planning regression: one availability query per key occurrence, 0.05–0.07 s combined.Ticket: CSHLD-2226
https://linear.app/bitgo/issue/CSHLD-2226/rust-miniscript-satisfier-recursion-is-exponential-in-nesting-depth-or